package com.jxpanda.commons.formatter;

import lombok.Getter;

import java.text.DecimalFormat;

/**
 * @author Panda
 */

@Getter
public enum DecimalFormatter {

    /**
     * 小数点后2位
     * */
    TWO_DECIMAL("#.00");

    private final String pattern;
    private final DecimalFormat formatter;

    DecimalFormatter(String pattern) {
        this.pattern = pattern;
        this.formatter = new DecimalFormat(pattern);
    }
}
